package javabook.ch04;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Jv_4_5_switch {
	/**
	 * @param args
	 */
	public static void main(String[] args) throws IOException{
		
		int point;
		char score = 0;
		
		String input;
		
		System.out.println("***** result *****");
		System.out.println("점수를 입력하세요. ");
		
		InputStreamReader ir = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(ir);
		
		input = br.readLine();
		point = Integer.parseInt(input);
		
		//if else 문을 이용하여 성적을 출력하는 프로그램을 완성하라. 
		//switch 문을 교체
		
		switch(point/10)
		{
			case  10:
				score = 'A';
				break;
			case  9:
				score = 'B';
				break;
			case 8:
				score = 'C';
				break;
			case 7:
				score = 'D';
				break;
			case 6:
				score = 'E';
				break;
				
			default:
				score = 'F';
				break;
		}
		
		System.out.println("학점은 " + score + "입니다.");
		
	}

}
